home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / dos / prg / pas / swag / tsr.swg / 0004_Prevent Ctl-Alt-Del Keys.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  829b  |  38 lines

  1. PROGRAM NoBoot ;
  2. {$M 1024, 0, 0 }     { TSR : reserve 1K stack no heap   }
  3. {$S-}                { Needed in a TSR }
  4.  
  5. Uses
  6.    Crt,    { Sound }
  7.    Dos,
  8.    KeyIntr ;
  9.  
  10. Var
  11.    OldInt09 : Pointer ;
  12.  
  13. {$F+}
  14. Procedure NewInt09 ; Interrupt ;
  15. Begin
  16.    EnableInterrupts ;                        { Delete key }
  17.    If ControlPressed and AltPressed and (ReadScanCode = $53) then
  18.    Begin
  19.       ResetKeyboard ;                         { Ignore key }
  20.       EOI ;
  21.  
  22.       Sound( 880 ) ;                          { optional }
  23.       Delay( 100 ) ;
  24.       Sound( 440 ) ;
  25.       Delay( 100 ) ;
  26.       NoSound ;
  27.  
  28.    End
  29.    Else
  30.       CallInterrupt( OldInt09 ) ;
  31. End ;
  32.  
  33. BEGIN
  34.    GetIntVec( $09, OldInt09 ) ;
  35.    SetIntVec( $09, Addr(NewInt09) ) ;
  36.    Keep( 0 ) ;                                 { make this a TSR }
  37. END.
  38.